package com.java.test.system.depositsettings.entity;

import lombok.Data;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

/**
 * Entity
 *
 * @author Administrator
 * @date 2020/6/29 0029
 */
@Data
public class DepositSettingsEntity implements RowMapper<DepositSettingsEntity> {
    private Long id;//id
    private String name;//名称
    private double amountStart;//发生额
    private double amountEnd;//发生额
    private int multiple;//倍数
    private String areaId;//地区id
    private String remarks;//备注
    private String operation;//操作人
    private Date modifyTime;//修改时间
    private Date createTime;//创建时间
    private int status;//状态
    private String areaName;//地区名称

    @Override
    public DepositSettingsEntity mapRow(ResultSet resultSet, int i) throws SQLException {
        DepositSettingsEntity info = new DepositSettingsEntity();
        info.setId(resultSet.getLong("id"));
        info.setName(resultSet.getString("name"));
        info.setAmountStart(resultSet.getDouble("amountStart"));
        info.setAmountEnd(resultSet.getDouble("amountEnd"));
        info.setMultiple(resultSet.getInt("multiple"));
        info.setAreaId(resultSet.getString("areaId"));
        info.setRemarks(resultSet.getString("remarks"));
        info.setOperation(resultSet.getString("operation"));
        info.setModifyTime(resultSet.getDate("modifyTime"));
        info.setCreateTime(resultSet.getDate("createTime"));
        info.setStatus(resultSet.getInt("status"));

        return info;
    }
}
